package base.bean.dto;

import base.bean.SuccessKilled;
import base.enums.SeckillStatEnum;

/**
 * 封装秒杀执行后的结果
 * Created by 30509 on 2018/3/25.
 */

public class SeckillExecution {

    private long seckillId;
    //秒杀执行状态
    private int state;
    //状态表示
    private String stateInfo;
    //秒杀成功对象
    private SuccessKilled successKilled;

    public SeckillExecution(long seckillId, SuccessKilled successKilled, SeckillStatEnum seckillStatEnum) {
        this.seckillId = seckillId;
        this.successKilled = successKilled;
        this.stateInfo = seckillStatEnum.getStateInfo();
        this.state = seckillStatEnum.getState();
    }

    public SeckillExecution(long seckillId,  SeckillStatEnum seckillStatEnum) {
        this.seckillId = seckillId;
        this.stateInfo = seckillStatEnum.getStateInfo();
        this.state = seckillStatEnum.getState();
     }

    public long getSeckillId() {
        return seckillId;
    }

    public void setSeckillId(long seckillId) {
        this.seckillId = seckillId;
    }

    public String getStateInfo() {
        return stateInfo;
    }

    public void setStateInfo(String stateInfo) {
        this.stateInfo = stateInfo;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public SuccessKilled getSuccessKilled() {
        return successKilled;
    }

    public void setSuccessKilled(SuccessKilled successKilled) {
        this.successKilled = successKilled;
    }
}
